﻿Namespace ORM
    Public Class PersonType_ORM

        Public Function GetAll() As System.Collections.Generic.List(Of EntityClass.PersonType_Entity)
            Dim oDatos As New WebCredit.Datos
            Dim dr As SqlClient.SqlDataReader
            Dim c As New System.Collections.Generic.List(Of EntityClass.PersonType_Entity)

            dr = oDatos.EjecutarSP_Col("spTipoPersonaGetAll")
            Do While dr.Read
                Dim oPersonType As New WebCredit.EntityClass.PersonType_Entity
                oPersonType.id_Tipo = dr("id_Tipo")
                oPersonType.Descripcion = dr("Descripcion")
                c.Add(oPersonType)
            Loop
            Return c
        End Function
    End Class
End Namespace
